import "./assets/main.css";
import { createApp } from "vue";
import { createPinia } from "pinia";
import { registerMicroApps, start } from "qiankun";
import App from "./App.vue";
import router from "./router";
registerMicroApps([
  {
    name: "vueson", // 子应用名字
    entry: "http://localhost:3001/",  // 子应用容器id 需要在父应用中创建相关元素
    container: "#subApp",
    activeRule: "/vueson", // 激活子应用的路由
  },
  {
    name: "umi3", // 子应用名字
    entry: "http://localhost:3002/",  // 子应用容器id 需要在父应用中创建相关元素
    container: "#umi3",
    activeRule: "/umi3", // 激活子应用的路由
  },
]);

start({
  sandbox: { 
    experimentalStyleIsolation: true,
  },
});

const app = createApp(App);

app.use(createPinia());
app.use(router);

app.mount("#app");
